package com.sjl.db137.service.imp;

import com.sjl.db137.entity.Menu;
import com.sjl.db137.service.UserService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sjl.db137.mapper.UserMapper;
import com.sjl.db137.entity.User;

import java.util.List;

/**
 * @Author: zero domain
 * @CreateTime: 2024/12/24 11:49
 * @Description: TODO
 * @Version: 1.0
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User userlogin(String uname, String upwd) {
        return this.baseMapper.userlogin(uname, upwd);
    }

    @Override
    public List<Menu> selectUserMenuByUserId(int userid) {
        return this.baseMapper.selectUserMenuByUserId(userid);
    }

    @Override
    public int insertUser(User user) {
        return this.baseMapper.insert(user);
    }

    @Override
    public int register(User user) {
        return this.baseMapper.insert(user);
    }
}
